/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.6                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     cfdemSolverPiso;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.1;

deltaT          0.0005;

writeControl    adjustableRunTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  no;

maxCo 0.1;

/*libs (
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libgroovyBC.so"
    "libfiniteVolumeCFDEM.so"
);*/

functions
{
    probes
    {
        type        probes;
        // Where to load it from
        functionObjectLibs ( "libsampling.so" );  
        // Name of the directory for probe data
        name        probes;
        probeLocations
        (
            (0.00003 0 0.0001)
            (0.00003 0 0.0529)
        );

        // Fields to be probed
        fields ( p U voidfraction volAverage_voidfraction);

        // Write at same frequency as fields
        outputControl   timeStep;//outputTime;
        outputInterval  1;
    }

    volFlow_inlet
    {
        type            surfaceFieldValue;
        functionObjectLibs ("libfieldFunctionObjects.so");
        outputControl   timeStep;
        outputInterval  1;
        log             true;
        writeFields     false;
        valueOutput     false;
        regionType      patch;
        name            inlet;
        operation       sum;
        fields
        (
            phi
        );
    }

    volFlow_outlet
    {
        type            surfaceFieldValue;
        functionObjectLibs ("libfieldFunctionObjects.so");
        outputControl   timeStep;
        outputInterval  1;
        log             true;
        writeFields     false;
        valueOutput     false;
        regionType      patch;
        name            outlet;
        operation       sum;
        fields
        (
            phi
        );
    }

    volFlow_wall
    {
        type            surfaceFieldValue;
        functionObjectLibs ("libfieldFunctionObjects.so");
        outputControl   timeStep;
        outputInterval  1;
        log             true;
        writeFields     false;
        valueOutput     false;
        regionType      patch;
        name            wall;
        operation       sum;
        fields
        (
            phi
        );
    }
}
// ************************************************************************* //
